/**
 * Created by Abduahad on 2018/2/8.
 */
var app = angular.module('HomeApp',[
    'ui.router',
    'HomeController',
    'ProductController',
    'CartController',
    'UserController',
]);
app.config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise("/home");
    $stateProvider
        .state('home', {
            url: '/home',
            views: {
                '': {
                    templateUrl: 'application/Home/View/Home/main.html',
                },
                'header@home':{
                    templateUrl: 'application/Home/View/Common/header.html',
                },
                'slider@home':{
                    templateUrl: 'application/Home/View/Home/slider.html',
                    controller:'SliderCtrl'
                },
                'content@home':{
                    templateUrl: 'application/Home/View/Home/content.html',
                },
                'index@home': {
                    templateUrl: 'application/Home/View/Home/index.html',
                    controller:'HomeCtrl'
                },
                'nav@home': {
                    templateUrl: 'application/Home/View/Common/nav.html',
                }
            }
        })
        .state('product', {
            url: "/product",
            views: {
                '': {
                    templateUrl: 'application/Home/View/Product/main.html',
                },
                'header@product':{
                    templateUrl: 'application/Home/View/Common/header.html',
                },
                'content@product':{
                    templateUrl: 'application/Home/View/Product/content.html',
                },
                'index@product': {
                    templateUrl: 'application/Home/View/Product/index.html',
                    controller:'ProductCtrl'
                },
                'nav@product': {
                    templateUrl: 'application/Home/View/Common/nav.html',
                }
            }
        })
        .state('cart', {
            url: "/cart",
            views: {
                '': {
                    templateUrl: 'application/Home/View/Cart/main.html',
                },
                'header@cart':{
                    templateUrl: 'application/Home/View/Common/header.html',
                },
                'content@cart':{
                    templateUrl: 'application/Home/View/Cart/content.html',
                },
                'index@cart': {
                    templateUrl: 'application/Home/View/Cart/index.html',
                    controller:'CartCtrl'
                },
                'nav@cart': {
                    templateUrl: 'application/Home/View/Common/nav.html',
                }
            }
        })
        .state('user', {
            url: "/user",
            views: {
                '': {
                    templateUrl: 'application/Home/View/User/main.html',
                },
                'header@user':{
                    templateUrl: 'application/Home/View/Common/header.html',
                },
                'content@user':{
                    templateUrl: 'application/Home/View/User/content.html',
                },
                'index@user': {
                    templateUrl: 'application/Home/View/User/index.html',
                    controller:'UserCtrl'
                },
                'nav@user': {
                    templateUrl: 'application/Home/View/Common/nav.html',
                }
            }
        })
});
